package ru.averta.notes.dao.impl;

import org.springframework.stereotype.Service;
import ru.averta.notes.dao.TagConnectorDao;
import ru.averta.notes.dao.TagDao;
import ru.averta.notes.other.UtilsCommon;

import javax.annotation.PostConstruct;

/**
 * <code>DaoFactory</code>
 *
 * @author fedor.belov (fedor.belov@mail.ru)
 *         Date: 16.09.11 18:56
 */

@Service
public class DaoFactory {

    private static TagDao tagDao;
    private static TagConnectorDao tagConnectorDao;

    @PostConstruct
    private void setUp() {
        tagDao = UtilsCommon.getBean(TagDao.class);
        tagConnectorDao = UtilsCommon.getBean(TagConnectorDao.class);
    }

    public static TagDao getTagDao() {
        return tagDao;
    }

    public static TagConnectorDao getTagConnectorDao() {
        return tagConnectorDao;
    }
}
